<me:UIAB50  x:Class="WPFExcelReport.TAB50RS"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
     xmlns:me="clr-namespace:WPFExcelReport"
     xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"  
     xmlns:PR="clr-namespace:WPFExcelReport;assembly=TICC_PRULES"  
     xmlns:YB="clr-namespace:WPFExcelReport;assembly=TGASTGA" 
     xmlns:AP="clr-namespace:WPFExcelReport;assembly=TAPKOPF" 
      xmlns:GS="clr-namespace:WPFExcelReport;assembly=TGSDAT" 
      xmlns:GD="clr-namespace:WPFExcelReport;assembly=TGAAUF"  
      xmlns:GSC="clr-namespace:WPFExcelReport;assembly=TGSCOLOR" 
     xmlns:AR="clr-namespace:WPFExcelReport;assembly=TABPR"
     xmlns:GB="clr-namespace:WPFExcelReport;assembly=TGLLG"  
      xmlns:MU="clr-namespace:WPFExcelReport;assembly=TABAUFM"  
   xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
     Loaded="Window_Loaded"
     x:Name="TV" 
 >
    <me:UIAB50.Resources>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:NOTBoolToVisibilityConverter  x:Key="nbv"/>
        <ucd:NOTConverter x:Key="not"/>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
    </me:UIAB50.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="2*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
             <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <WrapPanel Grid.Row="0"  Grid.Column="0">
            <WrapPanel  IsEnabled="{Binding ERLKZ,ElementName=TV,Converter={StaticResource not}}" >
                <Button Grid.Column="1" Height="20"  Width="24" Margin="0,10,0,0" Visibility="{Binding IsGD,ElementName=TV,Converter={StaticResource nbv}}" Click="btnPrePlan_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/ImagePackage;component/Images/Refresh.png" />
                    </Button.Background>
                </Button>
                <Button Grid.Column="1" Height="20"  Width="Auto" Margin="10,0,0,0" Content="{Binding Source={Localization:Translate Word=分批}}"  Click="btnSplitBatch_Click"/>
                <Button Grid.Column="1" Height="20"  Width="Auto" Margin="10,0,0,0" Content="{Binding Source={Localization:Translate Word=合投}}"  Click="btnGotoCombine_Click"/>
                <TextBlock Grid.Column="1" Text="{Binding Source={Localization:Translate Word=复板:}}"></TextBlock>
                <Grid IsEnabled="{Binding ERLKZ,ElementName=TV,Converter={StaticResource not}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button Grid.Column="0" Height="20"  Width="24" Margin="10,0,0,0"   IsEnabled="True" Click="FBStartCommand">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/arrow-right.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Grid.Column="1" Text="{Binding Source={Localization:Translate Word=启动}}"></TextBlock>
                </Grid>
                <Grid IsEnabled="{Binding ERLKZ,ElementName=TV,Converter={StaticResource not}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button Grid.Column="0" Height="20"  Width="24" Margin="10,0,0,0"   IsEnabled="True" Click="FBApproveCommand">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/button_ok.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Grid.Column="1" Text="{Binding Source={Localization:Translate Word=确认}}"></TextBlock>
                </Grid>
            </WrapPanel>
            <WrapPanel>
                <Grid Visibility="{Binding ERLKZ,ElementName=TV,Converter={StaticResource bv}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button Grid.Column="0" Height="20"  Width="24" Margin="10,0,0,0"  
                            IsEnabled="{Binding IsMaster}"
                           Click="FBResetCommand">
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/arrow-return.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Grid.Column="1" Text="{Binding Source={Localization:Translate Word=重置}}"></TextBlock>
                </Grid>
            </WrapPanel>
            <WrapPanel  IsEnabled="{Binding ERLKZ,ElementName=TV,Converter={StaticResource not}}">
                <Button Grid.Column="1" Height="20"  Width="Auto" Margin="10,0,0,0" Content="{Binding Source={Localization:Translate Word=回修}}"  Click="btnRepaire_Click"/>
            </WrapPanel>
        </WrapPanel>
       
        <PR:TRVRULES Grid.Row="1" Grid.Column="0" 
                       IsEdit="{Binding IsEdit,ElementName=TV}" 
                     Visibility="{Binding IsGD,ElementName=TV,Converter={StaticResource nbv}}"
                     Name="cRule"  ARTSTAGE="R"    
                     dwRule="{Binding dwRule,ElementName=TV}"
                     WH="{Binding WH,ElementName=TV}"
                    ORDERNUM="{Binding RULEKEY,ElementName=TV}"/>
        <GD:TGD713  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
                     Name="cGD"
                    FTAUTOGA="False"
                    AUFTYP="V"
                    ARTSTAGE="R" 
                    IsGridShow="True"
                     IsEdit="{Binding IsEdit,ElementName=TV}"
                    dwRule="{Binding dwRule,ElementName=TV}" 
                    IsGD="{Binding IsGD,ElementName=TV}" 
                    POSTYP="{Binding POSTYP,ElementName=TV}" 
                    ORDERNUM="{Binding KEY,ElementName=TV}"
                    />
        <Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"   
              Visibility="{Binding IsGD,ElementName=TV,Converter={StaticResource bv}}"
              >
            <Grid.RowDefinitions>
                <RowDefinition   Height="Auto" />
                <RowDefinition   Height="1*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <GB:TGLLG   Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
                    VerticalAlignment="Top"
                    dwReq="{Binding dwGD,ElementName=cYGA}"
                   dwGD="{Binding dwGD,ElementName=cGD}"
                            />
            <GD:YARNA     Grid.Row="0" Grid.Column="1"  Grid.RowSpan="2"
                          FTAUTOSUM="True"
                          SKEY1="GAART"
                          KEY1="QFREE"
                 Name="cYGA"  VerticalAlignment="Top"
                dwReq="{Binding dwGD,ElementName=cYGD}"            
            />
            <Grid  Grid.Row="0" Grid.Column="2"  Grid.RowSpan="2">
                <Grid.RowDefinitions>
                    <RowDefinition   Height="1*" />
                    <RowDefinition   Height="1*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <GD:Y3TGAAUF Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                      Name="cYGD"
                      EXTMU="SM"
                      dwReq="{Binding dwGD,ElementName=cGD}"
                      POSTYP="{Binding POSTYP,ElementName=cGD}"  />
                <GD:XZUTEI   Grid.Row="1" Grid.Column="0"  
                 Name="cZU" VerticalAlignment="Top"
                dwReq="{Binding dwGD,ElementName=cYGA}"            
            />
                <GD:XGAAUF   Grid.Row="1" Grid.Column="1" 
                 Name="cXGD"  VerticalAlignment="Top"
                dwReq="{Binding dwGD,ElementName=cYGA}"            
            />
            </Grid>
        </Grid>
    </Grid>
</me:UIAB50>
